package com.violet.common.constant.universal;

/**
 * @Author: wqf
 * @Date: 2022/04/07
 * @Description: 系统常量
 */
public interface SysConstant {
    /**
     * 环境常量
     */
    class Env {
        /**
         * 未处理
         */
        public static final String LOCAL = "local";
        /**
         * 处理中
         */
        public static final String DEV = "dev";
        /**
         * 处理失败
         */
        public static final String TEST = "test";
        /**
         * 处理成功
         */
        public static final String PROD = "prod";
    }

    /**
     * 负载均衡配置常量
     */
    class LoadBalance {
        /**
         * 是否开启自定义隔离规则
         */
        public static final String CONFIG_RIBBON_ISOLATION_ENABLED = "violet.ribbon.isolation.enabled";

        public static final String CONFIG_LOADBALANCE_ISOLATION = "violet.loadbalance.isolation";

        public static final String CONFIG_LOADBALANCE_ISOLATION_ENABLE = CONFIG_LOADBALANCE_ISOLATION + ".enabled";

        public static final String CONFIG_LOADBALANCE_ISOLATION_CHOOSER = CONFIG_LOADBALANCE_ISOLATION + ".chooser";

        public static final String CONFIG_LOADBALANCE_VERSION = "violet.loadbalance.version";
    }

    /**
     * 项目信息常量
     */
    class ProjectInfo {
        /**
         * 项目版本号(banner使用)
         */
        public static final String PROJECT_VERSION = "1.0.0";
        /**
         * 注册中心元数据 版本号
         */
        public static final String METADATA_VERSION = "version";
        /**
         * 负载均衡策略-版本号 信息头
         */
        public static final String V_L_T_VERSION = "v-l-t-version";
        /**
         * token 请求头
         */
        public static final String TOKEN_HEADER = "Authorization";
        /**
         * token 前缀
         */
        public static final String BEARER_TYPE = "Bearer ";
    }

    /**
     * 服务名常量
     */
    class ServerName {
        /**
         * 用户权限服务
         */
        public static final String USER_SERVICE = "user-center";
        /**
         * 搜索中心服务
         */
        public static final String SEARCH_SERVICE = "search-center";
    }

    /**
     * 超级管理员用户名
     */
     String ADMIN_USER_NAME = "admin";
}
